package com.lzy.managersystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzy.managersystem.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author qq619
* @description 针对表【sys_user】的数据库操作Mapper
* @createDate 2022-06-07 17:41:26
* @Entity com.lzy.managersystem.pojo.User
*/
@Mapper
public interface UserMapper extends BaseMapper<User> {

    //查询所有菜单
    List<User> selectAll();

    //插入菜单
    int insertSelective(User user);


    //根据id删除菜单
    int delById(@Param("id") Integer id);

    //更新菜单
    int updateSelective(User user);

    //查询当前用户的菜单权限
    List<User> selectUserMenu(@Param("username") String username);

    //修改密码
    int updatePassword(@Param("password") String password);

    //根据role查找
    List<User> selectAllByRole(@Param("role") String role);


}






